package com.xx.sg.sso;

import com.xx.sg.util.AjaxJson;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常处理
 * @author click33
 *
 */
@RestControllerAdvice
public class HandlerException {

	// 全局异常拦截
	@ExceptionHandler
	public AjaxJson handlerException(Exception e) {
		e.printStackTrace();
		return AjaxJson.getError(e.getMessage());
	}

}
